<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<h2 class="contentTitle">管理员更新</h2>
<div class="pageContent">
	<form method="post" action="${rootPath }/back/admins/adminsUpdateSubmit.htm"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this,navTabAjaxDone)">
		
		<%-- 传值 --%>
		<input type="hidden" name="navTabId" value="adminsList">
		<input type="hidden" name="rel" value="adminsList">
		<input type="hidden" name="callbackType" value="closeCurrent">
		<input type="hidden" name="forwardUrl" value="">
		<input type="hidden" name="confirmMsg" value="">
		
		<%--
		在更新的时候一定要传上id的值
		 --%>
		<input type="hidden" name="id" value="${requestScope.admins.id}">
		
		<div class="pageFormContent nowrap" layoutH="97">
			<dl>
				<dt>角色：</dt>
				<dd>
					<select name="roleId">
						<c:forEach items="${requestScope.roleList }" var="role" varStatus="stat">
							<option value="${role.id }" ${requestScope.admins.roleId == role.id ? 'selected' : '' }>${role.name }</option>
						</c:forEach>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>邮箱：</dt>
				<dd>
					<input type="text" name="email" class="required email"
						alt="请输入您的邮箱" value="${requestScope.admins.email }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>姓名：</dt>
				<dd>
					<input type="text" name="name" maxlength="20" class="required"  alt="请输入您的姓名" 
					 value="${requestScope.admins.name }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>手机：</dt>
				<dd>
					<input type="text" name="phone" class="phone" alt="请输入您的手机" 
					value="${requestScope.admins.phone }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>qq：</dt>
				<dd>
					<input type="text" name="qq" class="digits" alt="请输入您的qq"
					value="${requestScope.admins.qq }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>性别：</dt>
				<dd>
					<input type="radio" name="sex" value="0" id="adminsUpdateSex0" ${requestScope.admins.sex == '0' ? 'checked' : '' }/>
					<label for="adminsUpdateSex0">保密</label>
					<input type="radio" name="sex" value="1" id="adminsUpdateSex1" ${requestScope.admins.sex == '1' ? 'checked' : '' }/>
					<label for="adminsUpdateSex1">男</label>
					<input type="radio" name="sex" value="2" id="adminsUpdateSex2" ${requestScope.admins.sex == '2' ? 'checked' : '' }/>
					<label for="adminsUpdateSex2">女</label>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>状态：</dt>
				<dd>
					<input type="radio" name="status" value="1" id="adminsUpdateStatus1" ${requestScope.admins.status == '1' ? 'checked' : '' }/>
					<label for="adminsUpdateStatus1">启用</label>
					<input type="radio" name="status" value="0" id="adminsUpdateStatus0" ${requestScope.admins.status == '0' ? 'checked' : '' }/>
					<label for="adminsUpdateStatus0">禁用</label>
				</dd>
			</dl>
			<div class="divider"></div>
			<p></p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">提交</button>
						</div>
					</div>
				</li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>

</div>


<script type="text/javascript">
	function customvalidXxx(element) {
		if ($(element).val() == "xxx")
			return false;
		return true;
	}
</script>
